package com.cordys.uc.webapps.translator;

import java.io.BufferedWriter;
import java.io.File;
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class JavaScriptTranslator {
    
    private File srcFile;
    private static String EXCELFILE;
    BufferedWriter wrlog_exception = TranslationLogger.wrlog_exception;
    
    JavaScriptTranslator(File srcFile, String EXCELFILE) {
        this.srcFile = srcFile;
        JavaScriptTranslator.EXCELFILE = EXCELFILE;
        TranslationLogger.setExcelFile(EXCELFILE);
    }
    
    void translate() {
        String jsdata = FileUtil.getjsFile(srcFile.getAbsolutePath());
        if (jsdata != null && !jsdata.isEmpty()) {
            InlineJavascriptTranslator.processinlinejs(jsdata, srcFile.getAbsolutePath());
        }
    }
    
    
}
